home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_02_07 / 2n07046b < prev    next >
Text File  |  1991-04-08  |  528b  |  28 lines

  1. /* Dan Goldberg, 2/91 */
  2. /* MENU.C */
  3. /* Menu program skeleton for quick and dirty menus. */
  4. /* Good for work at client sites, for example */
  5.  
  6. #include <stdio.h>
  7.  
  8. main ()
  9. {
  10.  
  11.     int el;
  12.  
  13.     printf("\nYour Customer's Menu\n\n");
  14.     printf("1. First LARGE Program\n");
  15.     printf("2. Second LARGE Program\n");
  16.     printf("3. Quit\n");
  17.     printf("\nEnter Menu Choice => ");
  18.  
  19.     scanf("%d",&el);
  20.  
  21.     if ( el <= 3 )
  22.         _exit(el);
  23.     else
  24.         printf("\nInvalid menu choice!\n");
  25.     _exit(255);
  26.  
  27. }
  28.